#define _CRT_SECURE_NO_WARNINGS 1


#include<iostream>

using namespace std;

int main()
{
	int arr[3][4] = { {34, 91, 85, 59},{29, 93, 56, 12},{12, 72, 10, 77} };
	int min = 999999;
	int x = 0, y = 0;
	for (int i = 0; i < 3; i++)
	{
		int* pcur = *(arr + i);
		for (int j = 0; j < 4; j++)
		{
			if (pcur[j] < min)
			{
				min = pcur[j];
				x = i;
				y = j;
			}
		}
	}
	cout << x << ' ' << y << endl;

	return 0;
}